<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<f:view>
	<h:head>
		<link type="text/css" rel="stylesheet" href="themes/bluesky/skin.css" />
		<link type="text/css" rel="stylesheet"
			href="resources/css/wienerhelden.css" />
	</h:head>
	<h:body>
		<ui:composition template="template.xhtml">
			<ui:define name="content">
				<h1>Protocol Preparation</h1>
				<h2 class="name">Ticket Summary</h2>
				<dl>
					<dt>ID:</dt>
					<dd>
						<h:outputText value="#{prepareProtocolController.ticket.id}" />
					</dd>

					<dt>Description:</dt>
					<dd>
						<h:outputText
							value="#{prepareProtocolController.ticket.description}" />
					</dd>
					
					<dt>Surveyor Description:</dt>
					<dd>
						<h:outputText
							value="#{prepareProtocolController.ticket.surveyorDescription}" />
					</dd>

					<dt>Fault:</dt>
					<dd>
						<h:outputText value="#{prepareProtocolController.convertFault()}" />
					</dd>

					<dt>Customer:</dt>
					<dd>
						<ul class="no-circles">
							<li><h:outputText
									value="#{prepareProtocolController.ticket.customer.firstName}" />
								<h:outputText
									value="#{prepareProtocolController.ticket.customer.lastName}" />
							</li>
							<li><h:outputText
									value="#{prepareProtocolController.ticket.customer.mailAddress}" />
							</li>
							<li><h:outputText
									value="#{prepareProtocolController.ticket.customer.telNo}" />
							</li>
						</ul>
					</dd>

					<dt>SELECTED PARTNER:</dt>
					<dd>
						<h:outputText
							value="#{prepareProtocolController.ticket.selectedPartner.name}" />
					</dd>
					
				</dl>
				
				
					<h:form id="protocolPreparationForm">
					<div class="formBlock">
						<fieldset>
							<legend>Preperation Data</legend>

							<div>
								<h:outputLabel for="estimatedRepairDuration"
									value="Hours Needed for Repair:" />
								<p:inputText id="estimatedRepairDuration" style="width:15em"
									value="#{prepareProtocolController.ticket.estimatedRepairDuration}"
									required="true"
									requiredMessage="We need the estimated repair Duration."
									label="First name">
									<f:validateLength minimum="2" />
								</p:inputText>
							</div>

							<div>
								<p:commandButton id="submit" value="Submit Purchase Requisition"
									icon="ui-icon-check"
									action="#{prepareProtocolController.finish}" />


							</div>
						</fieldset>
						</div>
					</h:form>

				
			</ui:define>
		</ui:composition>
	</h:body>
</f:view>
</html>
